<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="__STATIC__/Home/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="__STATIC__/Home/hdjs/hdjs.min.js"></script>
<link rel="stylesheet" type="text/css" href="__STATIC__/Home/hdjs/hdjs.css"/>
<link rel="stylesheet" href="__STATIC__/Home/css/userinfo.css" />
<script language="javascript" src="__STATIC__/Home/js/address.js"></script>
<script type="text/javascript">
	$(function(){
		$('#add').click(function(){
			$('.add_form').slideDown(600);
		})
		$('.close').click(function(){
			$('.add_form').slideUp(600);
		})
	})
</script>
<script type="text/javascript">
    $(function () {
        $('#userinfo').validate({
            username: {
                rule: {
                	required: true,
                    ajax:{url:"{|U:'check_REG_User'}"}
                },
                error: {
                	required: '用户名不能为空',
                },
                success: '验证通过',
	            message: '请输入用户名'
            },
            email: {
                rule: {
                    required: true,
                    email: true
                },
                error: {
                    required: '密码不能为空',
                     email: '邮箱不正确'
                },
                success: '验证通过',
	            message: '请输入邮箱'
            },
        })

        
    });
</script>
<title>用户信息-卷皮网</title>
</head>

<body>
<!--载入顶部-->
<include file="__VIEW__/Common/header"/>

<!-- 头部开始 -->
<div id="header">
	<div id="top">
		<div class="logo">
			<a href="__WEB__"></a>
		</div>
		<div class="center">
			<a href=""></a>
			<a href=""></a>
			<a href=""></a>
		</div>
	</div>
	
</div>
<!-- logo结束 -->

<!-- 导航开始 -->
<div id="mainNav">
	<div class="nav">
		<ul>
			<li><a href="{|U:'OrdCen/index'}">我的卷皮</a></li>
			<li class="first"><a href="">账号设置</a></li>
			<!--<li><a href="">消息中心</a></li>-->
			<li class="ind">
			<a href="__WEB__">卷皮首页>></a></li>
		</ul>
	</div>
</div>
<!-- 导航结束 -->



<!-- 个人信息开始 -->
<div id="info">
	<div class="info_l">
		<div class="order">我的订单</div>
		<div <if value="$_GET['w']==0">class="one"</if> ><a  href="{|U:'index',array('w'=>0)}">基本资料</a><span>&gt;</span></div>
		<div <if value="$_GET['w']==1">class="one"</if> ><a href="{|U:'index',array('w'=>1)}">收货地址</a><span>&gt;</span></div>
		<!--<div <if value="$_GET['w']==2">class="one"</if> ><a href="{|U:'index',array('w'=>2)}">安全中心</a><span>&gt;</span></div>-->
	</div>

	<div class="info_r">
		<if value="$_GET['w']==0">
		<!--基本资料开始-->
		<div class="top">
			基本资料
		</div>
		<div class="con">
			<form method="post" action="" id="userinfo" enctype="multipart/form-data" name=form1 >
				<div class="li head">
					<if value="$userInfo['face']">
						<a href=""><img style="width: 80px;" src="__ROOT__/{$userInfo.face}"/></a>
					<else/>
						<a href=""><img style="width: 80px;" src="__STATIC__/Home/images/default.jpg"/></a>
					</if>
				</div>
				<div class="li use">
					用户名：<input type="text" name="username" id="" value="{$userInfo.username}"/>
				</div>
				<div class="li sex">
					性别：<input type="radio" name="sex" id="nan" checked="checked" value="男"/><label for="nan"> 男</label>
						<input type="radio" name="sex" id="nv" <if value="$userInfo['sex']=='女'">checked</if> value="女"/><label for="nv"> 女</label>
				</div>
				<div class="li date">生日：
					
					<select name=YYYY onchange="YYYYMM(this.value)">
						<option value="">年</option>
						</select>
						<select name=MM onchange="MMDD(this.value)">
						<option value="">月</option>
						</select>
						<select name=DD onchange="writeDay(this.value)">
						<option value="">日</option>
					</select>
				</div>
				<!--判断生日JS代码开始-->
					<script language="JavaScript">
						window.onload = function(){
						strYYYY = document.form1.YYYY.outerHTML;
						strMM = document.form1.MM.outerHTML;
						strDD = document.form1.DD.outerHTML;
						MonHead = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
						
						//先给年下拉框赋内容
						var y = new Date().getFullYear();
						var str = strYYYY.substring(0, strYYYY.length - 9);
						for (var i = (y-30); i < (y+10); i++) //以今年为准，前30年，后30年
						{
						str += "<option value='" + i + "'> " + i + "</option>\r\n";
						}
						document.form1.YYYY.outerHTML = str +"</select>";
						
						//赋月份的下拉框
						var str = strMM.substring(0, strMM.length - 9);
						for (var i = 1; i < 13; i++)
						{
						str += "<option value='" + i + "'> " + i + "</option>\r\n";
						}
						document.form1.MM.outerHTML = str +"</select>";
						
						document.form1.YYYY.value = y;
						document.form1.MM.value = new Date().getMonth() + 1;
						var n = MonHead[new Date().getMonth()];
						if (new Date().getMonth() ==1 && IsPinYear(YYYYvalue)) n++;
						writeDay(n); //赋日期下拉框
						document.form1.DD.value = new Date().getDate();
						}
						function YYYYMM(str) //年发生变化时日期发生变化(主要是判断闰平年)
						{
						var MMvalue = document.form1.MM.options[document.form1.MM.selectedIndex].value;
						if (MMvalue == ""){DD.outerHTML = strDD; return;}
						var n = MonHead[MMvalue - 1];
						if (MMvalue ==2 && IsPinYear(str)) n++;
						writeDay(n)
						}
						function MMDD(str) //月发生变化时日期联动
						{
						var YYYYvalue = document.form1.YYYY.options[document.form1.YYYY.selectedIndex].value;
						if (str == ""){DD.outerHTML = strDD; return;}
						var n = MonHead[str - 1];
						if (str ==2 && IsPinYear(YYYYvalue)) n++;
						writeDay(n)
						}
						function writeDay(n) //据条件写日期的下拉框
						{
						var s = strDD.substring(0, strDD.length - 9);
						for (var i=1; i<(n+1); i++)
						s += "<option value='" + i + "'> " + i + "</option>\r\n";
						document.form1.DD.outerHTML = s +"</select>";
						}
						function IsPinYear(year)//判断是否闰平年
						{ return(0 == year%4 && (year%100 !=0 || year%400 == 0))}
					</script>
					<!--判断生日JS代码结束-->	
				<div class="li use">
					邮箱：&nbsp;&nbsp;<input type="text" name="email" id="" value="{$userInfo.email}"/>
				</div>
				<div class="li">
					<!--如果有头像的时候-->
                	<if value="$userInfo['face']">
                		<!--__ROOT__是图片网络地址-->
                		<input type="hidden" name="face" value="{$userInfo.face}"/>
                	</if>	
					上传头像：<input type="file" name="face" id="" />
				</div>
				<div class="li sub">
					<input type="submit" id=""  value="提 交"/>
				</div>
			</form>
		</div>
		<!--基本资料结束-->
		</if>
		
		<if value="$_GET['w']==1">
			<!--收货地址开始-->
			<div class="top">
				收货地址
			</div>
			<div class="con2">
				<div class="dizhi">
					<div class="dizhi_tit">您已经创建 <span> 1 </span>个收货地址</div>
					<foreach from="$address" key="$k" value="$v">
					<div class="info">
						<if value="$k==0">
						<span class="moren">默认地址</span>
						<span class="dui"></span>
						</if>
						<span class="iconfont">&#xf012d;</span> {$v.Uname} 收<br />
						<span class="iconfont">&#xf00e9;</span> {$v.province}{$v.address}<br />
						<span class="iconfont">&#xf00a2;</span> {$v.phone} <a href="">修改</a> <span class="iconfont">&#xf01e6;</span>
					</div>
					</foreach>
					<div class="add"><a id="add" href="javascript:;">新增地址</a></div>
				</div>
			</div>
		
		<!--添加收货地址-->
		<div class="add_form" style="display: none;">
		<form action="{|U:'Order/address'}" method="post">
			<div class="inp">
				&nbsp;&nbsp;<span>*&nbsp;</span>收货人：<input type="text" name="Uname" id="" value="" />&nbsp;请填写收货人真实姓名，只能含字母或汉字
			</div>
			<div class="inp"><span>*&nbsp;</span>手机号码：<input type="text" name="phone" id="" /></div>
			<script language="javascript">
				var s=["s1","s2","s3"];
				var opt0 = ["请选择省","请选择市","请选择县（区）"];
				function setup(){
				 for(i=0;i<s.length-1;i++)
				  document.getElementById(s[i]).onclick=new Function("change("+(i+1)+")");
				 change(0);
				}
				window.onload=function(){
				setup()	
				};
				$(function(){
					$('.dj').live('click',function(){
						var dj = $('#s1').val() + '省,' + $('#s2').val() + '市,' + $('#s3').val();
						alert(dj);	
					})
				})
			</script>
			<div class="inp"><span>*&nbsp;</span>所在地区：
				<select id="s1" class="inp2" name="province">
					<option>省份</option>
				</select>
				<select id="s2" class="inp2" name="city">
					<option>地级市</option>
				</select>
				<select id="s3" class="inp2" name="county">
					<option>市、县级市、县</option>
				</select>
			</div>
			<div class="inp"><span>*&nbsp;</span>街道地址：<input class="inp3" type="text" name="address" id="" />&nbsp;请填写详细地址信息
			</div>
			<div class="inp inp7"><input class="inp8" type="checkbox" name="" id="" />设置为默认收货地址</div>
			<div class="inp inp10">
				<input class="inp11" type="submit" value="保存"/><a class="close" href="javascript:;">取消</a>
			</div>
		</form>
		</div>
		<!--收货地址结束-->
		</if>
	</div>
</div>
<!-- 个人信息分页结束 -->

<div id="hr"></div>

<!-- 底部开始 -->
<div id="bottom">
	<div class="bo_l">
		<img src="__STATIC__/Home/images/jp-app-90.png" alt="" /><br />
		扫描二维码下载
	</div>
	<div class="bo_c">
		<ul>
     		<p>获取更新</p>
			<li>●&nbsp;<a href="">iPhone/Android</a></li>
			<li>●&nbsp;<a href="">卷皮QQ空间</a></li>
			<li>●&nbsp;<a href="">卷皮新浪微博</a></li>
			<li>●&nbsp;<a href="">开放API</a></li>
		</ul>
		<ul>
     		<p>商务合作</p>
			<li>●&nbsp;<a href="">卖家免费报名</a></li>
			<li>●&nbsp;<a href="">商务合作</a></li>
			<li>●&nbsp;<a href="">廉政邮箱</a></li>
			<li>●&nbsp;<a href="">lianzheng@juanpi.com</a></li>
		</ul>
		<ul>
     		<p>公司信息</p>
			<li>●&nbsp;<a href="">关于卷皮</a></li>
			<li>●&nbsp;<a href="">媒体报道</a></li>
			<li>●&nbsp;<a href="">诚聘英才</a></li>
			<li>●&nbsp;<a href="">校园大使招募</a></li>
		</ul>
		<ul>
     		<p>帮助中心</p>
			<li>●&nbsp;<a href="">新手上路</a></li>
			<li>●&nbsp;<a href="">积分攻略</a></li>
			<li>●&nbsp;<a href="">网站地图</a></li>
		</ul>
	</div>
	<div class="bo_r">
		<a href=""></a>
		<span>周一至周日<br />9:00-22:00</span>
	</div>
</div>
<!-- 友情链接 -->
<div id="flink">
	 友情链接：
    <a href="">国画</a>
    <a href="">齐家装修</a>
    <a href="">大朴网</a>
    <a href="">世界名表</a>
    <a href="">葡萄酒</a>
    <a href="">易登网</a>
    <a href="">普洱茶</a>
    <a href="">中关村商城</a>
    <a href="">品牌鞋</a>
    <a href="">乐蜂网优惠券</a>
    <a href="">精选折扣</a>
    <a href="">拍鞋网官网</a>
	<a class="more" href="">更多>></a>
</div>


<div id="copy">
	武汉奇米网络科技有限公司 鄂ICP备10209250号　　Copyright © 2010 -2015 JuanPi.com All Rights Reserved
</div>

<div id="safe">
	<a href=""><img src="__STATIC__/Home/images/r_315online.gif" alt="" /></a>
	<a href=""><img src="__STATIC__/Home/images/r_cnnic.gif" alt="" /></a>
	<a href=""><img src="__STATIC__/Home/images/r_gongshang.gif" alt="" /></a>
	<a href=""><img src="__STATIC__/Home/images/sm_124x47.png" alt="" /></a>
</div>
<!-- 底部结束 -->
</body>
</html>
